/**
 * Created by malingling on 15-12-17.
 */
app.controller('RestaurantCtrl',function($scope,$location){
    $.ajaxSettings.async = false;
    $.getJSON('../json/data.json',function(data){
        $scope.restaurants = Restaurant.get_restaurant_name(data);
    })
    $scope.back_to_menu = function (restaurant){
        $location.path('menu');
        var restaurants = new Restaurant(restaurant)
        restaurants.store_restaurant()
    }
    $scope.back_to_up_page = function (){
        $location.path('menu')
    }
})